import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:递归打印数字的每一位
 * User: xwl
 * Date: 2023-04-03
 * Time: 19:37
 */
public class Test4 {
    public static void main(String[] args) {
        //输入
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        //调用函数
        print(n);
    }
    //递归打印数字，例如1234->1 2 3 4
    public static void print(int n) {
        if(n/10 != 0) {
            print(n/10);
            System.out.println(n % 10);
        }else {
            System.out.println(n);
        }
    }
}
